﻿namespace SERFLITEMAX20.Viewer
{
    using System;
    using System.Collections;
    using System.Windows.Forms;

    public class ListViewGroupSorter : IComparer
    {
        private SortOrder order;

        public ListViewGroupSorter(SortOrder theOrder)
        {
            this.order = theOrder;
        }

        public int Compare(object x, object y)
        {
            int num = string.Compare(((ListViewGroup) x).Header, ((ListViewGroup) y).Header);
            if (this.order == SortOrder.Ascending)
            {
                return num;
            }
            return -num;
        }
    }
}

